<!DOCTYPE html>
<html>
<head>
	<title></title>
	<script src="easeljs-0.7.1.min.js" type="text/javascript"></script>
	<script src="tweenjs-0.5.1.min.js" type="text/javascript"></script>
</head>
<body>
<canvas  id="canvas" width="600" height="600" style="border:1px solid #000"></canvas>


</body>
</html>


<script type="text/javascript">
	 var rect;
	 var count=0;
	 var stage = new createjs.Stage("canvas");
	 var text = new createjs.Text("text on canvas ...0!", "36px Arial", "#fff");
	 text.x=10;
	 text.y=10;
	 text.rotation=20;
	 stage.addChild(text);
	 rect = new createjs.Shape();
	 rect.x=10;
	 rect.y=10;
	 rect.rotation= text.rotation;
	 stage.addChildAt(rect,0);
	 createjs.Ticker.setFPS(100);
	 createjs.Ticker.addEventListener("tick",function(e){
	 	count++;
	 	text.text="text on canvas ..."+count+"!";
	 	rect.graphics.clear().beginFill("#ff0000").drawRect(-10,-10,text.getMeasureWidth()+20,50)
	 	stage.update(e)
	 })


</script>
